﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;

namespace DeZhen.Core.Framework.Entity
{
    [AttributeUsage(AttributeTargets.Class)]
    public class ServiceAttribute : Attribute
    {
        public ServiceLifetime LifeTime = ServiceLifetime.Singleton;
        public String Identifier { get; set; }
        public ServiceAttribute(ServiceLifetime serviceLifeTime)
        {
            LifeTime = serviceLifeTime;
        }
        public ServiceAttribute(ServiceLifetime lifeTime, string identifier) 
        {
            Identifier = identifier;
            LifeTime = lifeTime;
        }
        public ServiceAttribute(string identifier)
        {
            Identifier = identifier;
        }
        public ServiceAttribute()
        {

        }
    }
}
